fun2src

fun2src

Ex_doc: Spanish language support

How can I change the language in ex_doc?
“Summary” (English) → “Resumen” (Spanish)
“Functions” (English) → “Funciones” (Spanish)

Marked As Solved

fun2src

fun2src

Hi all,

Finally, I got the problem solved: PR1030

translation.ex
Spanish translations: es.ex

Thank you for all your help

Also Liked

wojtekmach

wojtekmach

Hex Core Team

Currently, the only way to change the language is to fork the project and update the templates yourself, see: ex_doc/lib/ex_doc/formatter/html/templates at main · elixir-lang/ex_doc · GitHub

If you’d like to work on making this configurable, we could definitely discuss it, open up a new issue or comment on Add support for gettext · Issue #466 · elixir-lang/ex_doc · GitHub.

The :language option is just a hint for the generated epub file.

NobbZ

NobbZ

There is the :language option available to it, perhaps it does already what you want?

:language - Identify the primary language of the documents, its value must be a valid BCP 47language tag; default: “en”

fun2src

fun2src

Yes, of course!. I believe it would be desirable to add support for gettext in ExDoc.
I would separate by locale:

  • Package: ex_doc (main).
  • Package (optional): ex_doc_locale_es_ES (spanish - spain).
  • Package (optional): ex_doc_locale_gl_ES (galician - spain).
  • Package (optional): ex_doc_locale_pt_PT (portuguese - portugal)

Doc sidebar: Add “locale selector”.

Thanks a lot for your assistance!

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement