One can manually select project language at Bitbucket or use .gitattributes at GitHub.
Is there a way to make GitLab assign a specific language to a project?
GitLab will adhere to the overrides specified in your .gitattributes file. Currently, GitLab uses the Linguist Gem. Without these overrides Linguist will deduce the main language used for a project by analysing the code within files in the project.
You can find out how the magic happens by referring to the Repository#main_language method within the gitlab-ce project.